($(function() {

  //商品删除
  $('.del').click(function(e) {
    var target = $(e.target);
    var id = target.data('id');
    var li = target.parent();

    $.ajax({
      url:'http://localhost:3000/admin/delProduct?prodId=' + id,
      type:'DELETE'
    }).done(function(result) {
      if(result.success === 1) {
        li.remove();
      }
    });

    });
  //商品修改
  $('.upd').click(function() {
    $('.updPad').css({'display':'block'});
  });

}))()